package com.woniuxy.orderServer.client;

import com.woniuxy.commons.util.Result;
import com.woniuxy.orderServer.client.model.MovieSession;
import com.woniuxy.orderServer.client.model.SessionTicket;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


@FeignClient(name = "product-server",path = "/product")
public interface ProductClient {


    @PostMapping("/sessionTicket/loadSessionTicketsByIds")
    public Result<List<SessionTicket>> loadSessionTicketsByIds(@RequestBody List<Integer> ticketIds);

    @PostMapping("/sessionTicket/updateSessionTicketsByIds")
    public Result<Boolean> updateSessionTicketsByIds(@RequestBody List<Integer> ticketIds);

    @PostMapping("/movieSession/loadMovieSessionById/{id}")
    public Result<MovieSession> loadMovieSessionById(@PathVariable("id") Integer id);


}
